package com.ttn.student.controller;

import com.ttn.common.core.entity.Result;
import com.ttn.common.core.entity.studentrecord.LearningProgressTimeRecord;
import com.ttn.student.service.LearningProgressTimeRecordService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * (learning_progress_time_record)表控制层
 *
 * @author xxxxx
 */
@RestController
@Slf4j
@RequestMapping("/learning-progress-time-record")
public class LearningProgressTimeRecordController {
    /**
     * 服务对象
     */
    @Resource
    private LearningProgressTimeRecordService learningProgressTimeRecordService;

    @PostMapping("/save/learning-progress-time-record")
    public Result saveLearningProgressTimeRecord(HttpServletRequest request, @RequestBody LearningProgressTimeRecord learningProgressTimeRecord) {
        log.info("LearningProgressTimeRecordController saveLearningProgressTimeRecord ,learningProgressTimeRecord参数:{}", learningProgressTimeRecord);
        learningProgressTimeRecordService.save(learningProgressTimeRecord);
        return Result.success();
    }
}
